import Vue from 'vue'
import App from './App.vue'


// 引入elementui组件
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

// 使用图片懒加载
import VueLazyload from 'vue-lazyload';
Vue.use(VueLazyload,{
  loading:require("@/assets/imgs/loadImg.gif"),
  error:require("@/assets/imgs/error.png"),
  attempt: 6,
	observer: true,
})
/**
 * 自定义全局过滤器
 */
//  格式化大于10000的数字
import formatNum from "./common/formatNum";
Vue.use(formatNum);
// 格式化时长
import formatDuration from "./common/formatDuration";
Vue.use(formatDuration);


Vue.config.productionTip = false


// 引入相关API请求接口
import API from '@/api'
Vue.prototype.$API = API;

// 全局读取localStorage
import {setItem,getItem,removeItem} from '@/common/utils.js'
Vue.prototype.setItem = setItem;
Vue.prototype.getItem = getItem;
Vue.prototype.removeItem = removeItem;

// 注册仓库
import store from '@/store'

// 注册路由
import router from '@/router'



new Vue({
  render: h => h(App),
  router,
  store
}).$mount('#app')
